package laf.time;

public class TimeManagerTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		final TimeManager tm = TimeManager.getInstance();
		
		tm.start();
		
		System.out.println("TM started.");
		for (int i = 0; i < 10; i++) {
			final int pr = i;
			new Thread() {
				public void run() {
					tm.waitTicks(1, pr);
					System.out.println(pr + ": " + System.nanoTime());
				}
			}.start();
		}
		tm.waitTicks(5, 0);
		System.out.println("After 5 ticks");
		
		tm.stop();
	}
}
